package hcn.protocol.brandnew.dengji.guahao;

import lombok.Data;
import javax.xml.bind.annotation.*;
import java.util.List;
import hcn.protocol.brandnew.BaseRequest;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import ctd.util.xml.jaxb.DateTimeAdapter;
import org.atag.sysrouter.annotation.DictionaryMapping;

import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;


/**
 * 门诊患者列表查询 - ODS_02030008_SUC
 *
 * @author enjoyLife
 */
@Data
@XmlRootElement(name = "Data")
@XmlAccessorType(XmlAccessType.FIELD)
public class ListPatientResponse {

    /**
     * 患者总人数
     */
    @XmlElement(name = "TotalNumberOfPatients")
    private String totalNumberOfPatients;
    /**
     * 未就诊人数
     */
    @XmlElement(name = "NumberOfNonSeeingDoctors")
    private String numberOfNonSeeingDoctors;
    /**
     * 就诊中人数
     */
    @XmlElement(name = "NumberOfPeopleInConsultation")
    private String numberOfPeopleInConsultation;
    /**
     * 已就诊人数
     */
    @XmlElement(name = "NumberOfPeopleDiagnosed")
    private String numberOfPeopleDiagnosed;
    /**
     * 患者列表
     */
    @XmlElementWrapper(name = "PatientLists")
    @XmlElement(name = "PatientList")
    private List<PatientList> patientLists;

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class PatientList {

        /**
         * 就诊医疗机构组织机构代码
         */
        @XmlElement(name = "VisitOrganization")
        private String visitOrganization;
        /**
         * 就诊机构名称
         */
        @XmlElement(name = "VisitOrganizationName")
        private String visitOrganizationName;
        /**
         * 科室代码
         */
        @XmlElement(name = "DeptCode")
        private String deptCode;
        /**
         * 科室名称
         */
        @XmlElement(name = "DeptName")
        private String deptName;
        /**
         * 门（急）诊号
         */
        @XmlElement(name = "ClinicId")
        private String clinicId;
        /**
         * 就诊流水号
         */
        @XmlElement(name = "VisitId")
        private String visitId;
        /**
         * 挂号顺序号
         */
        @XmlElement(name = "RegisteredSequence")
        private String registeredSequence;
        /**
         * 医院内患者唯一标识
         */
        @XmlElement(name = "SourcePatientId")
        private String sourcePatientId;
        /**
         * 患者姓名
         */
        @XmlElement(name = "Name")
        private String name;
        /**
         * 性别代码
         */
        @XmlElement(name = "Sex")
        private String sex;
        /**
         * 年龄（岁）
         */
        @XmlElement(name = "Age")
        private Short age;
        /**
         * 患者电话号码
         */
        @XmlElement(name = "ContactNo")
        private String contactNo;
        /**
         * 身份证件号码
         */
        @XmlElement(name = "IdCard")
        private String idCard;
        /**
         * 身份证件类别代码
         */
        @XmlElement(name = "IdCardCode")
        @DictionaryMapping(id = "CV02_01_101")
        private String idCardCode;
        /**
         * 就诊卡号
         */
        @XmlElement(name = "MedicalCardId")
        private String medicalCardId;
        /**
         * 就诊卡类别代码
         */
        @XmlElement(name = "MedicalCardType")
        private String medicalCardType;
        /**
         * 诊断日期时间
         */
        @XmlElement(name = "DiagnoseDateTime")
        @XmlJavaTypeAdapter(DateTimeAdapter.class)
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date diagnoseDateTime;
        /**
         * 诊断名称
         */
        @XmlElement(name = "DiagnoseName")
        private String diagnoseName;
        /**
         * 就诊状态代码
         */
        @DictionaryMapping(id = "visitStatus")
        @XmlElement(name = "VisitStatus")
        private String visitStatus;
        /**
         * 医生名称
         */
        @XmlElement(name = "DiagnoseDoctorName")
        private String diagnoseDoctorName;
        /**
         * 病人性质
         */
        @XmlElement(name = "PatientPropertiesName")
        private String patientPropertiesName;
    }

}
